<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="./lib/axios.min.js"></script>
</head>
<body>
<button>发送请求1</button>
</body>
<script>
    // api post
	const btns = document.querySelector("button");

	btns.onclick = async function () {
		const p1 = axios.get("http://zhangpeiyue.com/scoreList/2");
		const p2 = axios.get("http://zhangpeiyue.com/scoreList/3");
		const p3 = axios.get("http://zhangpeiyue.com/scoreList/4");
		const p4 = axios.get("http://zhangpeiyue.com/scoreList/5");
		// const result = await axios.all([p1,p2,p3,p4]);
		// console.log(result);

        axios.all([p1,p2,p3,p4]).then(axios.spread(function(v1,v2,v3,v4){
			console.log(v1.data,v2.data,v3.data,v4.data)
        }))
	}
</script>
</html>